package com.itheima.controller;

import com.itheima.pojo.Question;
import com.itheima.service.QuestionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author: liangWeiQUQ
 * @Description: UserControl
 * @DateTime: 2021/3/28 10:04
 **/
@RestController
@Api(tags = "添加问题Controller")
@RequestMapping("/system")
public class QuestionController {

    @Autowired
    private QuestionService questionService;

    @PostMapping("/addQuestion")
    @ApiOperation("添加问题的接口")
    public Question addQuestion(@RequestBody  Question question) {
        return questionService.add(question);
    }
}
